//
//  MoreViewController.m
//  LianShangBao
//
//  Created by 主事丫环HU on 2020/9/8.
//  Copyright © 2020 主事丫环. All rights reserved.
//

#import "MoreViewController.h"
#import "UserAgreementViewController.h"
@interface MoreViewController ()

@end

@implementation MoreViewController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:animated];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"更多";
    [self.leftbutton setImage:imgname(@"lefticon") forState:(UIControlStateNormal)];
    self.view.backgroundColor = [UIColor colorWithHexString:@"#F5F5F5"];
    
}
- (IBAction)clearCacheButtonClick:(UIButton *)sender {
    [MBProgressHUD showHUDAddedTo:self.view msg:@"清理中..." animated:YES];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        
        ShowToastWithText(@"清理完成");
        [MBProgressHUD hideHUDForView:self.view animated:YES];
       
    });
}
- (IBAction)userAgreementButtonClick:(UIButton *)sender {
    UserAgreementViewController * vc = [[UserAgreementViewController alloc] init];
    vc.urlString = [NSString stringWithFormat:@"%@%@",HOST_LINK,UserProtocal];
    vc.titleString = @"用户协议";
    [self.navigationController pushViewController:vc animated:YES];
}
- (IBAction)privacyPolicyButtonClick:(UIButton *)sender {
    UserAgreementViewController * vc = [[UserAgreementViewController alloc] init];
    vc.urlString = [NSString stringWithFormat:@"%@%@",HOST_LINK,UserPolicy];
    vc.titleString = @"隐私政策";
    [self.navigationController pushViewController:vc animated:YES];
}


@end
